package threedee.generator;

public enum BlockType {
	BUILDING1, BUILDING2, STRAIGHT_ROAD, T_CROSSING_ROAD, X_CROSSING_ROAD, TURN_ROAD, DUMMY_ROAD;
	
	public String toString(){
		switch (this) {
		case BUILDING1: 		return "@";
		case BUILDING2: 		return "#";
		case STRAIGHT_ROAD: 	return ".";
		case T_CROSSING_ROAD:	return "T";
		case X_CROSSING_ROAD:	return "+";
		case TURN_ROAD:			return "L";
		case DUMMY_ROAD:		return "o";
		default:				return " ";
		}
	}
	
	public String toString(int rotation){
		switch (this) {
		case BUILDING1: 		return "@";
		case BUILDING2: 		return "#";
		case STRAIGHT_ROAD: 	if (rotation == 0) return "-";
								else return "|";
		case T_CROSSING_ROAD:	if (rotation == 0) return "T";
								else if (rotation == 90) return "J";
								else if (rotation == 180) return "L";
								else return "F";
		case X_CROSSING_ROAD:	return "+";
		case TURN_ROAD:			if (rotation == 0) return "/";
								else if (rotation == 90) return "\\";
								else if (rotation == 180) return "/";
								else return "\\";
		case DUMMY_ROAD:		return "o";
		default:				return " ";
		}
	}
}
